module Test where

import Language.Dependencies.ReferencesCore
import Language.Dependencies.ConsistencyFunctions
import Language.Map.Map

-- offset dummy
od = O 0 0

-- some entries
ex = (E 'x' 123 od)
ey = (E 'y' 456 od)
ez = (E 'z' 789 od)

-- some maps
mz = Cons ez (Empty od) od
myz = Cons ex mz od
mxyz = Cons ex myz od

mx = Cons ex (Empty od) od
myx = Cons ey mx od
mzyx = Cons ez myx od

test1 = mzyx
test2 = mxyz

----------

-- erster Eintrag in der Map xyz
ax1 :: Address MAP Map Entry 
ax1 = Address TheMap mxyz TheEntry [0]

-- dritter Eitnrag in der Map mzyx
ax2 :: Address MAP Map Entry
ax2 = Address TheMap mzyx TheEntry [1,1,0]

-- x-ter Eitnrag in einer Liste
a :: Map -> Path -> Address MAP Map Entry
a m p = Address TheMap m TheEntry p


ref1 :: Reference
ref1 = Reference ax1 ax2 cee

ref2 :: Reference
ref2 = Reference (a mxyz [1,0]) (a mzyx [1,0]) cee

result = map checkref [ref1,ref2]
-- 
